<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="utf-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"/>
    <title>响应式导航条</title>
    <link href="css/bootstrap.css" rel="stylesheet">
    <style>
        @media (max-width: 768px) {
            form{
                display: none;
            }
        }
    </style>
</head>
<body>
<nav class="nav navbar-inverse" style="padding-right: 20px">
    <div class="navbar-header">
        <!--navbar-toggle样式用于toggle收缩的内容，即nav-collapse collapse样式所在的元素-->
        <button  class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse" >
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
        </button>
        <!--确保无论在宽屏还是窄屏，navbar-brand都会显示-->
        <a href="#" class="navbar-brand">LOGO</a>
    </div>
    <!--屏幕宽度小于768px时，该div内的内容默认都会隐藏（通过点击icon-bar所在的图标，可以展开）大于768px时默认显示-->
    <div class="collapse navbar-collapse navbar-left">
        <ul class="nav navbar-nav ">
            <li><a class="active" href="#">首页</a></li>
            <li><a href="#">图书 </a></li>
            <li><a href="#">作品 </a></li>
            <li><a href="#">展览 </a></li>
            <li><a href="#">关于我们 </a></li>
        </ul>
    </div>
    <form class="navbar-form navbar-right" role="search">
        <div class="form-group">
            <input type="text" class="form-control" placeholder="Search">
        </div>
        <button type="submit" class="btn btn-default">搜索</button>
    </form>
</nav>

<script src="js/jquery-1.12.4.js"></script>
<script src="js/bootstrap.js"></script>
</body>
</html>